#include "air32f10x_conf.h"
#ifndef _TIM3_H 
#define _TIM3_H
extern volatile uint32_t tim3_count;
extern volatile uint8_t stop_refresh_led_while_usart_send;

__STATIC_FORCEINLINE void tim3_inc_and_clear_update_flag()
{
    TIM3->SR = (uint16_t)~TIM_IT_Update;
    tim3_count++;
}

__STATIC_FORCEINLINE uint32_t tim3_read_count()
{
    return tim3_count;
}

__STATIC_FORCEINLINE void tim3_set_count(uint32_t count)
{
    tim3_count = count;
}

void TIM3_Init();

#endif // !_TIM3_H 